#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_angle_adaptive
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_angle_adaptive(id_num=data.id_num, angle=data.angle, speed=data.speed, torque=data.torque)
    rospy.loginfo("set_angle_adaptive_node")


def listener():
    rospy.init_node("set_angle_adaptive", anonymous=True)
    rospy.Subscriber("set_angle_adaptive", set_angle_adaptive, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

